<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
  
    <link rel="stylesheet" type="text/css" href="/Public/admin/Css/bootstrap.min.css" />
     <link rel="stylesheet" type="text/css" href="/Public/admin/Css/ui.css" />
      <link rel="stylesheet" type="text/css" href="/Public/admin/Css/Admin-default.css" />
   
</head>
<body>
<style type="text/css">
.dz-error-message span * {font-size: 12px !important;}
</style>
<div class="page-content-wrap">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="panel panel-default">
                                <div class="panel-body">
<div class="top-sec">
    <form id="upload-form" action="<?php echo U('Signimage/upload', array('questionnaire_id'=>$questionnaire_id));?>" class="dropzone">
        <button id="uploadBtn" class="btn btn-success"> 确 认 上 传 </button>
    </form>
    
    <div id="signimage-info">
        <div>
            <p>该问卷已上传 <strong><?php echo ($totalNum); ?></strong> 张签名图</p>
            <p>其中 <strong><?php echo ($activeNum); ?></strong> 张启用状态</p>
        </div>
    </div>
</div>

<form id="signimage-list-form" action="<?php echo U('Signimage/delete');?>" method="post">
    <div class="table-tools">
        <button type="submit" class="btn btn-primary" title="删除勾选的图片"><i class="glyphicon glyphicon-remove"></i> 删 除 </button>
        <button id="updateStatusBtn" type="button" class="btn btn-success" title="重新设定图片启用状态" onclick="sortQuestions()"><i class="fa fa-copy"></i> 重 设 </button>
        <p>签名图列表</p>
    </div>

    <table id="signimage-table" class="table table-striped table-hover table-condensed datatable">
        <thead>
            <tr>
                <th>序号</th>
                <th>图片</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <?php if(is_array($signimages)): $i = 0; $__LIST__ = $signimages;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$image): $mod = ($i % 2 );++$i;?><tr>
                    <td><?php echo ($i); ?> <input name='id[]' type="checkbox" value="<?php echo ($image["id"]); ?>" /></td>
                    <td class="signimage-thumb"><image src="<?php echo ($image["path"]); ?>" /></td>
                    <td>
                        <?php switch($image["status"]): case "on": ?><label class="switch switch-small"><input name='status[<?php echo ($image["id"]); ?>]' type="checkbox" checked value="on"/><span></span></label><?php break;?>
                            <?php case "off": ?><label class="switch switch-small"><input name='status[<?php echo ($image["id"]); ?>]' type="checkbox" value="off"/><span></span></label><?php break; endswitch;?>
                    </td>
                    <td>
                        <a href="<?php echo U('Signimage/delete', array('id'=>$image['id']));?>" class="btn btn-danger btn-rounded btn-condensed btn-sm" title="删除问卷"><span class="fa fa-times"></span></a>
                    </td>
                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>